<!DOCTYPE html>
<html lang="ch" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="admin/include :: head" />
</head>
<body>
<div id="app">
    <th:block th:include="admin/include :: header-nav"/>
    <div class="page-main">
        <th:block th:include="admin/include::nav-menu" />
        <div class="page-content">
            <div class="breadcrumb">
                <p><i class="iconfont icon-home-fill"></i> 首页</p>
            </div>
            <div class="content-body">
                <form>
                    <label>
                        用户名：
                        <input type="text" class="bl-input" name="username"/>
                    </label>
                    <label>
                        手机号：
                        <input type="text" class="bl-input" name="phone"/>
                    </label>
                    <button class="bl-btn bl-btn-primary" id="msg" bl-size="medium">查询</button>
                    <button class="bl-btn bl-btn-success" bl-size="medium">新增</button>
                </form>
                <table id="dataTable"></table>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    $(function () {
        $("#getUser").click(function () {
            $.ajax({
                url: '/admin/user/getUserById',
                success:function (response) {
                    console.log(response)
                }
            })
        })

        let table = new Table({
            el: '#dataTable', //表格id
            url: '/admin/user/getAllUser', //url
            queryData: {}, //查询参数
            enableOption: false,//开启操作列
            enableUpBtn: true,//开启修改按钮
            enableDelBtn: true,//开启删除按钮
            columns: [{field: 'userId', title: 'ID'},
                {field: 'username', title: '用户名'},
                {field: 'nickname', title: '昵称'},
                {field: 'email', title: '邮箱'}], //标题与对应字段
        })
    })
</script>
</body>
</html>